import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
//官方配置文档 https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
  const env = loadEnv(mode, __dirname)
  return {
    // define: { 'process.env': {} },
    base: env.VITE_APP_WEB_URL,
    server: {
      host: "0.0.0.0",
      port: env.VITE_APP_PORT,
    },
    plugins: [vue()],
    //启用运行时编译
    resolve: { alias: { 'vue': 'vue/dist/vue.esm-bundler.js' } }
  }
})